<?php

class Involved_AccrualDayModel extends BaseModel
{

    protected $table = 'accrual_day';

    /**
     * @return mixed
     */
    public function AccrualInfo($user_id)
    {
        return DB::table($this->table)
            ->where('user_id',$user_id)
            ->orderBy('auto_id','desc')
            ->take(30)
            ->get();
    }

    /**
     * @return mixed
     */
    public function Accrualcount($user_id)
    {
        return DB::table($this->table)
            ->select('auto_id')
            ->where('user_id',$user_id)
            ->count();
    }

}
